﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework;


namespace AwesomeEnginePC.Inputs
{
    public enum MouseButton
    {
        LeftButton,
        MiddleButton,
        RightButton,
        XButton1,
        XButton2,
        ScrollWheelForward,
        ScrollWheelBack,
    }

    /// <summary>
    /// Represents any user pressed button (keyboard, mouse, gamepad, etc)
    /// </summary>
    public abstract class BaseInputButton
    {
        public abstract object Button { get; protected set; }
    }

    public class InputGamePadButton : BaseInputButton
    {
        public InputGamePadButton(Buttons btn)
        {
            GamePadButton = btn;
        }

        public override object Button { get { return GamePadButton; } protected set { GamePadButton = (Buttons)value; } }

        public Buttons GamePadButton { get; set; }
    }

    public class InputKeyboardButton : BaseInputButton
    {
        public InputKeyboardButton(Keys key)
        {
            Key = key;
        }

        public override object Button { get { return Key; } protected set { Key = (Keys)value; } }

        public Keys Key { get; set; }
    }

    public class InputMouseButton : BaseInputButton
    {
        public InputMouseButton(MouseButton mBtn)
        {
            MButton = mBtn;
        }

        public override object Button { get { return MButton; } protected set { MButton = (MouseButton)value; } }

        public MouseButton MButton { get; set; }
    }
}
